<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class FishingSiteMonitor extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'fishing_site_monitors';


    public function getImgAttribute($img)
    {
        if (!$img) {
            return '';
        }
        return img_url($img);
    }


    public function site()
    {
        return $this->hasOne(FishingSite::class, 'id', 'site_id');
    }

}
